/**
* Copyright (c) By zengqh.
*
* This program is just for fun or demo, in the hope that it  
* will be useful, you can redistribute it and/or modify freely.
*
* Time: 2013/03/15
* File: MeshLODLevel.h
* Blog: http://www.cnblogs.com/zengqh/
**/

#pragma once

#include "Mesh.h"

namespace HY
{
class Geometry;
class MeshLODLevel
{
public:
	MeshLODLevel(Mesh* mesh = 0);
	virtual ~MeshLODLevel();

	Mesh* getMesh() const;

	void setMesh(Mesh* mesh);

	float getLODDistance() const;

	void setLODDistance(float dis = 0.0f);

	void clearIndexBuffer();

	void createIndexBuffer();

	IndexBuffer* getIndexBuffer() const;

	void clearGeometries();

	void createGeometries();

	std::vector<Geometry>* getGeometries() const;

protected:
	Mesh*						mesh_;
	float						distance_;
	IndexBuffer*			ib_;
	std::vector<Geometry>*		geometry_list_;
};
}